The present invention relates to an automatic gain control (AGC) circuit used to control exposure for an image sensor installed in an imaging device, such as a digital still camera or a digital video camera.
Many camera systems using an image sensor (CCD or CMOS) are provided with an AGC function for automatically correcting exposure in accordance with the brightness of a subject that is to be imaged. The AGC function calculates the brightness of the image and corrects exposure based on the difference between the calculated brightness and the target brightness. The exposure adjustment is enabled by adjusting the gain of an amplifier, which amplifies an output signal of an imaging device, or by adjusting the exposure time. The AGC function is required to perform the exposure adjustment operation in a smoother manner and increase the exposure adjustment range.
An AGC circuit installed in an imaging device, such as a digital still camera or a digital video camera, handles image subjects of which brightness ranges widely from a high brightness to a low brightness. To handle such image subjects, the AGC circuit dynamically adjusts the frame rate in accordance with the brightness of each image subject. The frame rate is changed by changing a clock signal, which controls an image sensor. More specifically, the clock signal for the image sensor is generated by dividing the frequency of a reference clock signal, and the clock signal is changed by changing the frequency division ratio.
FIG. 10 shows a prior art example of an AGC circuit that changes the frame rate based on a frequency division signal of the reference clock signal.
In the drawing, an image sensor block 1 includes an element array 2, which is formed by a large quantity of photoelectric conversion elements such as CMOS image sensors, an amplifier 3, an AD converter 4, a timing control circuit 5, and a frequency division circuit 6.
The frequency division circuit 6 generates an internal clock signal CLK by dividing the frequency of a reference clock signal SCLK and provides the timing control circuit 5 with the generated signal. The timing control circuit 5 generates a horizontal/vertical synchronization signal HV based on the internal clock signal CLK and outputs signals including a reset signal and a read signal to the element array 2.
The element array 2 performs a reset operation and a read operation for every line of the photoelectric conversion elements based on the reset signal and the read signal, and sequentially provides the amplifier 3 with the read data. The amplifier 3 amplifies the read data, and the AD converter 4 converts an output signal of the amplifier 3 into a digital value to generate brightness data BD.
An AGC circuit 7 includes an adder 8, a flip-flop circuit 9, a divider 10, and an exposure control circuit 11.
The adder 8 receives the brightness data BD from the AD converter 4. Then, the adder 8, the flip-flop circuit 9, and the divider 10 operate to calculate an average brightness Y1 for each frame. Such operations are performed in synchronization with the operation of the image sensor block 1 based on the horizontal/vertical synchronization signal HV, which is provided from the image sensor block 1.
The exposure control circuit 11 receives the average brightness Y1, which is provided from the divider 10, and a target brightness T, which is set in advance in a storage unit, such as a register. Then, based on the difference between the target brightness T and the average brightness Y1 the exposure control circuit 11 provides the amplifier 3 with a gain adjustment signal A1, the timing control circuit 5 with an integration (exposure) time adjustment signal A2, and the frequency division circuit 6 with a frequency division ratio setting signal A3.
The amplifier 3 adjusts the gain based on the gain adjustment signal A1. The timing control circuit 5 adjusts the integration time, which is the time interval between the reset signal and read signal provided to each element, based on the integration (exposure) time adjustment signal A2. The frequency division circuit 6 sets the frequency division ratio based on the frequency division ratio setting signal A3.
The AGC circuit controls the average brightness Y1 so that it becomes equal to the target brightness T based on the gain adjustment signal A1, the integration time adjustment signal A2, and the frequency division ratio setting signal A3, which are provided from the exposure control circuit 11, when the average brightness Y1 and the target brightness T input to the exposure control circuit 11 differ from each other.
More specifically, the average brightness Y1 is adjusted by adjusting the total gain based on a combination of the gain adjustment of the amplifier 3 performed with the gain adjustment signal A1, the integration time adjustment performed with the integration time adjustment signal A2, and the frame rate change performed with the frequency division ratio setting signal A3.
When the brightness of the imaging subject is high, the total gain is changed based solely on the integration time adjustment. When the brightness of the imaging subject is medium or low, the total gain is changed based on the integration time adjustment, the frame rate change, and the gain adjustment of the amplifier 3.
FIG. 11 shows the operation of an AGC circuit such as that described above for adjusting the average brightness Y1 based on the adjustment of the gain G1 of the amplifier 3 and the change of the frame rate FL when the average brightness Y1 of each frame is lower than the target brightness T.
When, for example, the average brightness Y1 is lower than the target brightness while the circuit is operating at a frame rate FL of 30 fps, the gain G1 of the amplifier 3 is raised based on the gain adjustment signal A1. As a result, the average brightness Y1 increases.
When the gain G1 of the amplifier 3 reaches a predetermined level that is set in advance but the average brightness Y1 does not reach the target brightness T, the frame rate FL is changed from 30 fps to 15 fps. As a result, the integration time becomes two times longer. This instantaneously increases the average brightness Y1 by two times.
When the average brightness Y1 exceeds the target brightness T, the gain G1 of the amplifier 3 is lowered to decrease the average brightness Y1. If the average brightness Y1 is higher than the target brightness T after a predetermined time elapses, the frame rate FL is changed again from 15 fps to 30 fps to increase the gain G1 of the amplifier 3.
Next, if the average brightness Y1 does not reach the target brightness T after the predetermined time elapses, the frame rate FL is changed again from 30 fps to 15 fps.
This operation equalizes the average brightness Y1 with the target brightness T. As a result, the gain G1 of the amplifier 3 and the average brightness Y1 converge on fixed levels.
Further, when the brightness of the imaged subject is high, the total gain is adjusted based solely on the integration time adjustment signal. FIG. 12 shows the change of the exposure time when the total gain is adjusted based solely on the integration time adjustment signal A2. The exposure time is controlled based on the number of pulses of a clock signal that is provided from the frequency division circuit. Thus, the exposure time is proportional to the value of the total gain.
In the structure described above, the frame rate is changed by dividing the frequency of the reference clock signal SCLK and changing the internal clock signal CLK that is input in the timing control circuit 5. This changes the frame rate at a ratio obtained by multiplying two by an integer. Then, when the frame rate is lowered because the imaged subject has a low brightness, the responsiveness to the movement of the image subject is lowered. Thus, the image may become unstable and the image may not be smooth.
As shown in FIG. 11, when the frame rate is switched, the total gain changes instantaneously. In this case, the average brightness Y1 of the imaged data changes greatly. As a result, the exposure control fails to be performed smoothly, and the time required for convergence of the average brightness Y1 increases.
Further, because the internal clock signal CLK changes based on the change of the frame rate, the output timing of the image also changes dynamically in accordance with the change of the internal clock signal CLK. This complicates the structure for achieving synchronization between systems that transmit and receive the image.
Further, as shown in FIG. 12, when the total gain is changed from 1 to 2 and the exposure time is adjusted based solely on the integration time adjustment signal A2 in an area in which the total gain is at its minimum, the exposure time is also changed from 1 to 2. Setting the exposure time at 1 would mean setting the exposure time at a value corresponding to one pulse of the internal clock signal CLK and setting the interval between a reset signal and a read signal at a value corresponding to one pulse of the internal clock signal CLK.
Thus, when the exposure time changes from 1, which is the shortest exposure time, to 2, which is the next exposure time, the exposure control is executed only when the average brightness changes by at least ½ of the average brightness value. In other words, when the average brightness is lowered while the circuit is operating with the shortest exposure time and the exposure time changes to the next exposure time, the brightness of the imaged data changes instantaneously. In this case, smooth exposure control cannot be executed.
For the reasons described above, in the tolerable exposure time range of the photoelectric conversion elements in the element array 2, values close to the shortest exposure time are not used. Accordingly, the performance of the image sensor is underused in the exposure control at the high brightness side, and the exposure control range is limited.
The present invention provide an AGC circuit that executes smooth exposure control when the brightness of imaged data changes and increases the range of exposure control executed in accordance with the brightness of the imaging subject.